$(document).ready(function(){
	var validator = $("#frmBlog").validate({
		errorElement:'div',
		rules: {
			title: {
				required: true
			},
			blog_image: {
				required: true,
				accept: "jpeg|png|gif|jpg"
			}
		},
		messages: {
			title: {
				required: "Enter blog title"
			},
			blog_image: {
				required: "Select the image for blog",
				accept: "Please upload only jpeg|png|gif|jpg type of image"
			}
		}
	});
	
	var validator = $("#frmEditBlog").validate({
		errorElement:'div',
		rules: {
			title: {
				required: true
			},
			description: {
				required: true
			}			
		},
		messages: {
			title: {
				required: "Enter blog title"
			},
			description: {
				required: "Enter blog description"
			}			
		}
	});
	
	/* FCKEditor validation*/
	if(typeof jQuery.fn.fckEditorValidate == 'function') {
		jQuery.fn.fckEditorValidate({instanceName: 'description'});
	}
	
});